home *** CD-ROM | disk | FTP | other *** search
/ Amiga News 96 / Amiga News 96.iso / amig_ad_os / avm / prog / source / playtime.avmsrc < prev    next >
Text File  |  1977-12-31  |  1KB  |  56 lines

  1. startrecord=true
  2. label=playtime
  3. nodetype=8
  4. line1=procedure
  5. line2=parse arg secs
  6. line3=hours = secs % (60*60)
  7. line4=minutes = (secs - (hours * 60 * 60)) % 60
  8. line5=if hours < 12 then pm = 0
  9. line6=else do; pm = 1; hours = hours - 12; end
  10. line7=if hours = 0 then hours = 12
  11. line8=
  12. line9=timeformat = getclip('AVMTimeFormat')
  13. line10=if timeformat = "" then timeformat = '%hours12 %minutes %pm'
  14. nextactiontype=3
  15. nextactionaction=
  16. endrecord=true
  17. startrecord=true
  18. label=
  19. nodetype=8
  20. line1=do i = 1 to words(timeformat)
  21. line2=  if upper(word(timeformat, i)) = '%HOURS12' then
  22. line3=    call playddnumber(hours)
  23. line4=  else if upper(word(timeformat, i)) = '%HOURS24' then
  24. line5=    call playddnumber(hours + (pm * 12))
  25. line6=  else if upper(word(timeformat, i)) = '%MINUTES' then
  26. line7=    call playddnumber(minutes)
  27. line8=  else if upper(word(timeformat, i)) = '%PM' then
  28. line9=    do
  29. line10=
  30. nextactiontype=3
  31. nextactionaction=
  32. endrecord=true
  33. startrecord=true
  34. label=
  35. nodetype=8
  36. line1=      if pm then call playAVoice('avm:voices/timepm')
  37. line2=      else call playAVoice('avm:voices/timeam')
  38. line3=    end
  39. line4=  else
  40. line5=    call playAVoice(word(timeformat, i))
  41. line6=end
  42. line7=
  43. line8=
  44. line9=
  45. line10=
  46. nextactiontype=3
  47. nextactionaction=
  48. endrecord=true
  49. startrecord=true
  50. label=
  51. nodetype=14
  52. comment=We're done
  53. nextactiontype=2
  54. nextactionaction=return
  55. endrecord=true
  56.